<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>实时动态</title>
    <meta name="keywords" content="实时动态" />
    <meta name="description" content="实时动态" />
    <link href="/static/css/party/style.css" rel="stylesheet" type="text/css">
    <link href="/static/js/party/myfocus/js/mf-pattern/mF_classicHC.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/static/webjars/layui/css/layui.css"  media="all">
    <script type="application/javascript" src="/static/webjars/layui/layui.all.js"></script>
    <script type="application/javascript" src="/static/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/static/css/party/foot.css"/>


    <link href="/static/css/party/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common2018.css.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/iconfont.css" rel="stylesheet" type="text/css">

    <link href="/static/css/party/font-awesome.min.css" rel="stylesheet" type="text/css">
    <script type="application/javascript" src="/static/js/party/template-web.js"></script>
    <script type="application/javascript" src="/static/js/party/template-web-extends.js"></script>
    <script type="application/javascript" src="/static/js/party/boorstap.min.js"></script>
    <script type="application/javascript" src="/static/js/party/common.js"></script>

</head>
<body>
<div class="padlogo w1200 mt50">
    <div class="danghui fl ml25"><img src="/static/images/party/img/danghui.gif"/></div>
    <div class="logo fl ml20 mt8"><img src="/static/images/party/img/logo.png"/></div>
    <div class="slogo fr"><embed src="/static/images/party/img/donghua.swf" width="600" height="150" wmode="transparent" /></div>
    <div class="clear"></div>
</div>

<div class="w1000 mt60" >
    <ul class="nav" style="text-align: center" id="dingbu">
        <li class="bg2">&nbsp;</li>
        <li class="bg2" style="width: 143px;" party-src="/party/home/index"><a href="javascript:;">首页</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/news"><a href="javascript:;">新闻资讯</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/education"><a href="javascript:;">教育培训</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/service"><a href="javascript:;">服务大厅</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/map"><a href="javascript:;">党建地图</a></li>
        <li class="bg2" style="width: 143px"><a href="/party/home/admin" target="_blank">后台管理</a></li>

        <%--<li class="bg2"><a href='/views/party/fore/index1.jsp' target='_blank'>后台管理</a></li>--%>
    </ul>

</div>
<div class='nav_bg w1000 mt30'><img src='/static/images/party/img/nav_bg.png' class='tcenter'/></div>

<div class="clearfix"></div>
<div class="container" style="height: 680px;">
    <div class="row list-dx">

        <div class="col-sm-2 layui-side" style="border-right:1px #eeeeee solid;margin:0; padding:0; height:599px;" >
            <div class="list-top-title" style="border-color: #d02e25 " > <img src="/static/images/party/img/dangjianyw.png" ><h4 style="color: #d02e25">实时动态</h4></div>
            <ul class="list-nav" style="margin-top:20px; background-color: #D7E3E3">

                <li style="color:#d02e25; "><a href="/party/home/news"><span class="" style="padding:0 10px 0 0; "></span>党建要闻 </a></li>
                <li style="color:#d02e25; "><a style="color: red;" href="#"><span class="" style="padding:0 10px 0 0; "></span>实时动态 </a></li>
                <li style="color:#d02e25; "><a href="/party/home/politicalarticle"><span class="" style="padding:0 10px 0 0; "></span>政治思想建设 </a></li>
                <li style="color:#d02e25; "><a href="/party/home/notice"><span class="" style="padding:0 10px 0 0; "></span>通知公告 </a></li>


            </ul>
        </div>
        <div class="col-sm-10" >
            <div class="list-right-title" style="border-color: #d02e25 ">
                <h4 style="color: #d02e25">实时动态</h4>
                <div class="list-right-title-bg"></div>
            </div>
            <div class="list-list" style="height: 460px;">
                <ul id="articleList">




                </ul>
            </div>

            <div id="demo20" style="text-align: center"></div>
        </div>
    </div>
</div>




<div id="ft" class="clearfix">
    <div class="ft-center">
        <span>智慧兴文公共信息平台:&nbsp;</span>
        <a>All Rights Reserved.&nbsp;&nbsp;</a>
        <span>版权所有:&nbsp;</span>
        <a href="http://www.ituohui.com/" target="_blank">四川省数聚汇智科技有限公司</a>
    </div>
</div>






</body>
</html>

<script type="application/javascript">
    $("li[party-src]").click(function(){
        var that = $(this);
        var src = that.attr("party-src");
        window.location.href = src;
    });
</script>
<script type="application/javascript">
    $.post("/ajax/party/newsarticle",{
        check:2
    },function (res) {
        console.log(res.data);
        var laypage = layui.laypage
            ,layer = layui.layer;

        //将一段数组分页展示

        //测试数据
        var data = res.data;

        //调用分页
        laypage.render({
            elem: 'demo20'
            ,count: data.length
            ,theme: '#D13325'
            ,limit:10
            ,jump: function(obj){
                //模拟渲染
                document.getElementById('articleList').innerHTML = function(){
                    var arr = []
                        ,thisData = data.concat().splice(obj.curr*obj.limit - obj.limit, obj.limit);
                    layui.each(thisData, function(index, item){
                        arr.push('<li>\n' +
                            '                        <a href="javascript:void(0);" onclick="toMore('+ item.id +')" target="_blank" title='+ item.title +'>\n' +
                            '                            '+item.title+'\n' +
                            '                        </a>\n' +
                            '                        <span>\n' +
                            '                                         <small class="pull-right text-muted">\n' +
                            '                                            '+ item.updateTime +'\n' +
                            '                                          </small>\n' +
                            '                                    </span>\n' +
                            '                    </li>');
                    });
                    return arr.join('');
                }();
            }
        });
    })

    function toMore(id) {
        window.open("/party/home/article?sId="+id);
    }


</script>